package s0404.dao;

import s0404.entity.Department;
import s0404.entity.School;
import s0404.exception.BaseException;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.Collection;

/**
 * @author 刘永渠
 * @project xg22
 * @date 2024/3/26
 */
public interface DepartmentDao {
    boolean add(Department department) throws SQLException;
    Department find(Integer id) throws SQLException, BaseException, InvocationTargetException;

    Collection<Department> findAll() throws SQLException, BaseException, InvocationTargetException;

    boolean update(Department department) throws SQLException;
    boolean delete(Integer id) throws SQLException;
    boolean delete(Department department) throws SQLException;
    int count(School school) throws SQLException;


}
